from selenium import webdriver

# 创建浏览器操作对象
path = 'chromedriver.exe'
url = "https://www.jd.com"
browse = webdriver.Chrome(path)
# 访问网页
browse.get(url)
# page_source获取网页的源码
content = browse.page_source
print(content)